class TasksController < ApplicationController
  def create
    if params[:last_task]
      @last_task=Task.find(params[:last_task])
      @last_task.done=true
      @last_task.save
    end
    @task=Task.new params[:task]
    @task.done=false
    @task.save
    redirect_to tasks_path(:embed=>'true')
  end
  def index
    @user=current_users
    @todos=@user.todos


    if params[:embed]=='true'
      render :layout=>'simple'
    else
      
    end
  end
end
